package com.education.business.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.education.business.mapper.education.OrgInfoMapper;
import com.education.business.service.education.OrgInfoService;
import com.education.model.dto.DropDownOpts;
import com.education.model.dto.OrgInfoDto;
import com.education.model.entity.OrgInfoEntity;
import com.education.model.vo.EduInstVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author HP
 * @description 针对表【org_info(入驻机构信息)】的数据库操作Service实现
 * @createDate 2025-05-21 17:45:14
 */
@Service
public class OrgInfoServiceImpl extends ServiceImpl<OrgInfoMapper, OrgInfoEntity> implements OrgInfoService {

    @Autowired
    private OrgInfoMapper orgInfoMapper;


    public List<OrgInfoEntity> getList(OrgInfoDto orgInfoDto) {
       return orgInfoMapper.selectList(orgInfoDto);
    }

    @Override
    public void save(EduInstVo vo) {
        OrgInfoEntity entity = new OrgInfoEntity();
        entity.setId(vo.getId());
        entity.setOrgName(vo.getOrgName());
        entity.setEnable(vo.getEnable());
        entity.setAddress(vo.getAddress());
        this.saveOrUpdate(entity);
    }
}




